package com.watson.btp.ws.config;


import cn.hutool.core.util.XmlUtil;
import com.watson.btp.ws.dto.NewQuote;
import com.watson.btp.ws.dto.NewQuoteResponse;
import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
import org.springframework.ws.soap.client.core.SoapActionCallback;

/**
 * @author 胡广
 * @date 5/27/22
 * @since JDK1.8
 */
public class WsClient extends WebServiceGatewaySupport {


    public NewQuoteResponse newQuote(NewQuote newQuote) {

        NewQuoteResponse response = (NewQuoteResponse) getWebServiceTemplate().marshalSendAndReceive(newQuote, new SoapActionCallback("http://webcominc.com/NewQuote"));

        return response;
    }


}